import requests


class SubmitAPI:
    def __init__(self, base_url):
        self.base_url = base_url

    def submit_initiative(self, payload, headers=None):
        """对应 url1 的 POST 请求"""
        url = f"{self.base_url}/report/initiative/submit"
        return requests.post(url, data=payload, headers=headers)

    def submit_force_node(self, payload, headers=None):
        """对应 url2 的 POST 请求"""
        url = f"{self.base_url}/report/force/submitNode"
        return requests.post(url, data=payload, headers=headers)

    def report_list(self, payload, headers=None):
        """报告列表查询接口，用以获取taskId"""
        url = f"{self.base_url}/report/list"
        return requests.post(url, data=payload, headers=headers)

